import java.util.Scanner;

public class Test {
    public static int fac (int n ){
        int m = 1;
        for (int i = 1; i <= n ; i++) {
            m *= i;
        }
        return m;
    }
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int rec = fac(n);
        System.out.println(rec);
    }
}
